import axios from 'axios';
import { userListResult } from '@/models/userModel';

export class UserApi {

    /**
     {
        code:0,
        msg:"成功"，
        data:[
            {
                id: 1;
                username:"zhangshan";
                packageid:1;
                passtime:"2018-08-08";
            },
            {
                id: 1;
                username:"zhangshan";
                packageid:1;
                passtime:"2018-08-08";
            }
        ]
  }
     */
    public async getList() {
        try {
            let d = await axios.get("http://xxxx.com");
            return d.data as userListResult;
        } catch (error) {
            throw error;
        }
    }

    public setPwd() {

    }
}